/*
 * @Author: leechoy 1419352779@qq.com
 * @Date: 2025-02-08 01:24:25
 * @LastEditors: leechoy 1419352779@qq.com
 * @LastEditTime: 2025-02-08 01:24:27
 * @FilePath: /server/middleware/swagger.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
const swaggerJsdoc = require('swagger-jsdoc');

const options = {
    definition: {
        openapi: '3.0.0',
        info: {
            title: 'Node.js Swagger API',
            version: '1.0.0',
            description: 'A simple Express API with Swagger documentation',
        },
        servers: [
            {
                url: 'http://localhost:3000',
            },
        ],
    },
    apis: ['./app.js'], // 指定包含 Swagger 注释的文件路径
};

const specs = swaggerJsdoc(options);
module.exports = specs;